ImagXpress® can be used in conjunction with PDF Xpress™ to display PDF pages. Assign bitmaps rendered using PDF Xpress to an ImagXpress object to leverage its image-viewing features.
To view a PDF document page:
- Create a PdfDocument object for an existing PDF document.
- Create a RenderOptions object to select an area of the PDF page and the target resolution.
- Invoke RenderPageOptionsToDib to produce a DIB handle.
- Assign the DIB handle to the ImagXpress property hDIB to view the rendered area in ImagXpress.
VB Example | ![]() |
---|---|
'This code demonstrates viewing a PDF file On Error GoTo error Dim imagXpress1 As ImagXpress Dim pdfxpress1 As PdfXpress pdfxpress1.Initialize pdfxpress1.RaiseExceptions = True Dim document As New PdfDocument document.SetParentControl pdfxpress1 document.OpenDocument "C:\test.pdf","" Dim renderOpts As New RenderOptions rendOptions.HorizontalResolution = 300 rendOptions.VerticalResolution = 300 imagXpress1.hDIB = document.RenderPageOptionsToDib(0, rendOptions) . . . GoTo finish error: MsgBox Err.Description finish: Set document = Nothing pdfxpress1.Terminate Set pdfxpress1= Nothing |